package com.mediacloud.app.newsmodule.activity.microlive;
public class MicroLiveDetailListAdapter{

}
//import android.content.Context;
//import androidx.recyclerview.widget.RecyclerView;
//import android.text.TextUtils;
//import android.view.LayoutInflater;
//import android.view.ViewGroup;
//
//import com.mediacloud.app.model.news.ArticleItem;
//import com.mediacloud.app.newsmodule.R;
//import com.mediacloud.app.newsmodule.adaptor.NoMoreAdapter;
//import com.mediacloud.app.newsmodule.microlive.Lives;
//
///**
// */
//
//public class MicroLiveDetailListAdapter extends NoMoreAdapter<Lives>
//{
//
//    public ArticleItem articleItem;
//
//    public MicroLiveDetailListAdapter(Context context, int noMoreRes) {
//        super(context, noMoreRes);
//    }
//
//
//    @Override
//    public RecyclerView.ViewHolder onCreateViewHolder( int viewType,ViewGroup parent)
//    {
//        switch (viewType)
//        {
//            case IMicroDetailDataObj.ImgText:
//                return new MicroLiveDetailItemOneImgViewHolder(LayoutInflater.from(context).inflate(R.layout.microlive_detailfragment_itemtitle,parent,false),IMicroDetailDataObj.ImgText);
//            case IMicroDetailDataObj.NineImg:
//                return new MicroLiveNineGridImageHolder(LayoutInflater.from(context).inflate(R.layout.microdetail_fragment_itemnineimg,parent,false),IMicroDetailDataObj.NineImg);
//            case IMicroDetailDataObj.Video:
//                return new MicroLiveVideoItemHolder(LayoutInflater.from(context).inflate(R.layout.microdetail_fragment_itemvideo,parent,false),IMicroDetailDataObj.Video);
//        }
//        return new MicroLiveDetailItemBaseViewHolder(LayoutInflater.from(context).inflate(R.layout.microlive_detailfragment_itemtitle,parent,false),IMicroDetailDataObj.OnlyText);
//    }
//
//    @Override
//    public void onBindViewHolder(int position,RecyclerView.ViewHolder holder)
//    {
//        if(position>=data.size()||holder==null)
//            return;
//        MicroLiveDetailItemBaseViewHolder baseViewHolder= (MicroLiveDetailItemBaseViewHolder) holder;
//        baseViewHolder.articleItem=articleItem;
//        baseViewHolder.setItemData(getItem(position));
//    }
//
//    @Override
//    public @IMicroDetailDataObj.LiveType int getViewItemType(int position)
//    {
//        if(position>=data.size())
//            return IMicroDetailDataObj.OnlyText;
//        Lives item=getItem(position);
//        if(item.getImage()!=null)
//        {
//            if(item.getImage().size()==1)
//            {
//                if(TextUtils.isEmpty(item.getVideopath()))
//                    return IMicroDetailDataObj.ImgText;
//                else
//                    return IMicroDetailDataObj.Video;
//            }
//            else if(item.getImage().size()>1)
//                return IMicroDetailDataObj.NineImg;
//            else
//                return IMicroDetailDataObj.OnlyText;
//        }
//        else  if(!TextUtils.isEmpty(item.getVideopath()))
//            return IMicroDetailDataObj.Video;
//        else
//        {
//            return IMicroDetailDataObj.OnlyText;
//        }
//    }
//
//}